package bean;

import dao.IDIF;

/**
 * A base class for Comment for manipulation of the data
 * @author Anne Lorayne
 *
 */
public class CommentBean implements IDIF{
 


	private String Id;
	 
	private String comment;
	
	private String login;
	
	private String owner;
	 
	/**
	 * Constructor of the class
	 * @param ID
	 * @param comment
	 */
	public CommentBean(String owner, String ID, String comment, String login){
		this.Id = ID;
		this.comment = comment;
		this.login = login;
		this.owner = owner;
	}
	
	public CommentBean(){}

	
	// ------Getters and Setters------
	
	public String getId() {
		return Id;
	}
	

	public void setId(String iD) {
		Id = iD;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}
	
	/**
	 * @return the login
	 */
	public String getLogin() {
		return login;
	}

	/**
	 * @param login the login to set
	 */
	public void setLogin(String login) {
		this.login = login;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (obj == null || !(obj instanceof CommentBean) )
			return false;
		CommentBean anotherCommentBean = (CommentBean) obj;
		
		if (this.getId().equals(anotherCommentBean.getId()))
			return true;
		
		return false;
	}

	public String getOwner() {
		
		return owner;
	}

}
 
